import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import top.aiprogram.controller.UserController;
import top.aiprogram.service.UserService;

public class Main {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("./top/aiprogram/resource/application-context.xml");

        UserController controller =  context.getBean(UserController.class);

        UserService service = controller.getUserService();
        service.person("基本学会了",28);
        System.out.println("姓名为："+service.getName()+" 年龄为："+service.getAge());
        service.character();
    }
}
